(* Content-type: application/vnd.wolfram.mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Mathematica 9.0' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       157,          7]
NotebookDataLength[     29801,        990]
NotebookOptionsPosition[     24477,        802]
NotebookOutlinePosition[     25125,        827]
CellTagsIndexPosition[     25046,        822]
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{
Cell[TextData[{
 "New in: ",
 Cell["XX", "HistoryData",
  CellTags->"New"],
 " | Modified in: ",
 Cell[" ", "HistoryData",
  CellTags->"Modified"],
 " | Obsolete in: ",
 Cell[" ", "HistoryData",
  CellTags->"Obsolete"],
 " | Excised in: ",
 Cell[" ", "HistoryData",
  CellTags->"Excised"]
}], "History",
 CellID->1247902091],

Cell[CellGroupData[{

Cell["Categorization", "CategorizationSection",
 CellID->1122911449],

Cell["Symbol", "Categorization",
 CellLabel->"Entity Type",
 CellID->686433507],

Cell["TransferMatrixFormalism Package", "Categorization",
 CellChangeTimes->{3.6000068953538656`*^9},
 CellLabel->"Paclet Name",
 CellID->144455187],

Cell["TransferMatrixFormalism`", "Categorization",
 CellLabel->"Context",
 CellID->130392281],

Cell["TransferMatrixFormalism/ref/RefractionMv", "Categorization",
 CellChangeTimes->{3.6000068961650667`*^9},
 CellLabel->"URI",
 CellID->603290130]
}, Open  ]],

Cell[CellGroupData[{

Cell["Keywords", "KeywordsSection",
 CellID->477174294],

Cell["refraction matrix", "Keywords",
 CellChangeTimes->{{3.6235467005117407`*^9, 3.6235467111197596`*^9}},
 CellID->1164421360],

Cell["matrix of refraction", "Keywords",
 CellChangeTimes->{{3.6235467005117407`*^9, 3.62354672263258*^9}},
 CellID->978050760],

Cell["Eq. 6", "Keywords",
 CellChangeTimes->{{3.6235467005117407`*^9, 3.6235467254717846`*^9}},
 CellID->174380810]
}, Open  ]],

Cell[CellGroupData[{

Cell["Syntax Templates", "TemplatesSection",
 CellID->1872225408],

Cell[BoxData[""], "Template",
 CellLabel->"Additional Function Template",
 CellID->1562036412],

Cell[BoxData[""], "Template",
 CellLabel->"Arguments Pattern",
 CellID->158391909],

Cell[BoxData[""], "Template",
 CellLabel->"Local Variables",
 CellID->1360575930],

Cell[BoxData[""], "Template",
 CellLabel->"Color Equal Signs",
 CellID->793782254]
}, Closed]],

Cell[CellGroupData[{

Cell["Details", "DetailsSection",
 CellID->307771771],

Cell["XXXX", "Details",
 CellLabel->"Lead",
 CellID->670882175],

Cell["XXXX", "Details",
 CellLabel->"Developers",
 CellID->350963985],

Cell["XXXX", "Details",
 CellLabel->"Authors",
 CellID->8391405],

Cell["XXXX", "Details",
 CellLabel->"Feature Name",
 CellID->3610269],

Cell["XXXX", "Details",
 CellLabel->"QA",
 CellID->401364205],

Cell["XXXX", "Details",
 CellLabel->"DA",
 CellID->350204745],

Cell["XXXX", "Details",
 CellLabel->"Docs",
 CellID->732958810],

Cell["XXXX", "Details",
 CellLabel->"Features Page Notes",
 CellID->222905350],

Cell["XXXX", "Details",
 CellLabel->"Comments",
 CellID->240026365]
}, Closed]],

Cell[CellGroupData[{

Cell["RefractionMv", "ObjectName",
 CellID->1224892054],

Cell[TextData[{
 Cell["      ", "ModInfo"],
 Cell[BoxData[
  RowBox[{
   ButtonBox["RefractionMv",
    BaseStyle->"Link",
    ButtonData->"paclet:TransferMatrixFormalism/ref/RefractionMv"], "[", 
   RowBox[{"\"\<\!\(\*
StyleBox[\"pol\", \"TI\"]\)\>\"", ",", 
    SubscriptBox[
     StyleBox["\[Theta]", "TR"], 
     RowBox[{"v", "-", "1"}]], ",", 
    SubscriptBox[
     StyleBox["\[Theta]", "TR"], 
     StyleBox["v", "TI"]], ",", 
    SubscriptBox[
     StyleBox["n", "TI"], 
     RowBox[{"v", "-", "1"}]], ",", 
    SubscriptBox[
     StyleBox["n", "TI"], 
     StyleBox["v", "TI"]]}], "]"}]], "InlineFormula"],
 "\[LineSeparator]gives the matrix of refraction at interface ",
 Cell[BoxData[
  StyleBox["v", "TI"]], "InlineFormula",
  ShowStringCharacters->False],
 " of a thin film system for \"pol\"-polarized light wave with refraction \
angle ",
 Cell[BoxData[
  SubscriptBox[
   StyleBox["\[Theta]", "TR"], 
   StyleBox["i", "TI"]]], "InlineFormula",
  ShowStringCharacters->False],
 " and refractive index ",
 Cell[BoxData[
  SubscriptBox[
   StyleBox["n", "TI"], 
   StyleBox["i", "TI"]]], "InlineFormula",
  ShowStringCharacters->False],
 " in the adjacent media.  ",
 ButtonBox["Eq. 6",
  BaseStyle->"Link",
  ButtonData->
   "paclet:TransferMatrixFormalism/ReferencePages/Symbols/RefractionMv#\
148884605"],
 "."
}], "Usage",
 CellChangeTimes->{{3.5980090643222694`*^9, 3.598009289996266*^9}, 
   3.5980094040490665`*^9, {3.598015107064316*^9, 3.5980151071735163`*^9}}],

Cell["\<\
The polarization state of the field \"pol\" may be either \"s\" or \"p\".\
\>", "Notes",
 CellChangeTimes->{3.5980090583786592`*^9},
 CellID->1067943069],

Cell[TextData[{
 Cell[BoxData[
  RowBox[{
   ButtonBox["RefractionMv",
    BaseStyle->"Link",
    ButtonData->"paclet:TransferMatrixFormalism/ref/RefractionMv"], "[", 
   RowBox[{"\"\<\!\(\*
StyleBox[\"pol\", \"TI\"]\)\>\"", ",", 
    SubscriptBox[
     StyleBox["\[Theta]", "TR"], 
     RowBox[{"v", "-", "1"}]], ",", 
    SubscriptBox[
     StyleBox["\[Theta]", "TR"], 
     StyleBox["v", "TI"]], ",", 
    SubscriptBox[
     StyleBox["n", "TI"], 
     RowBox[{"v", "-", "1"}]], ",", 
    SubscriptBox[
     StyleBox["n", "TI"], 
     StyleBox["v", "TI"]]}], "]"}]], "InlineFormula"],
 " is one of two characteristic matrices central to the transfer matrix \
formalism, the other is the phase matrix ",
 ButtonBox["PhaseMv",
  BaseStyle->"Link",
  ButtonData->"paclet:TransferMatrixFormalism/ref/PhaseMv"],
 ". "
}], "Notes",
 CellChangeTimes->{{3.598009436372323*^9, 3.598009588523391*^9}, {
   3.5980097393464556`*^9, 3.5980099015263405`*^9}, {3.5980099999791136`*^9, 
   3.598010054096609*^9}, 3.5980132575766664`*^9, {3.5980148955717444`*^9, 
   3.5980149047757607`*^9}, {3.598015095629496*^9, 3.598015145447983*^9}, {
   3.59801524092875*^9, 3.5980153604559574`*^9}},
 CellID->129421124],

Cell[TextData[{
 ButtonBox["RefractionMv",
  BaseStyle->"Link",
  ButtonData->"paclet:TransferMatrixFormalism/ref/RefractionMv"],
 " is given by ",
 Cell[BoxData[
  FormBox[
   RowBox[{
    SubscriptBox["W", 
     RowBox[{
      RowBox[{"v", "-", "1"}], ",", "v"}]], "=", 
    RowBox[{
     FractionBox["1", 
      SubscriptBox["t", 
       RowBox[{
        RowBox[{"v", "-", "1"}], ",", "v"}]]], 
     RowBox[{"(", "\[NoBreak]", GridBox[{
        {"1", 
         SubscriptBox["r", 
          RowBox[{
           RowBox[{"v", "-", "1"}], ",", "v"}]]},
        {
         SubscriptBox["r", 
          RowBox[{
           RowBox[{"v", "-", "1"}], ",", "v"}]], "1"}
       },
       GridBoxAlignment->{
        "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, 
         "Rows" -> {{Baseline}}, "RowsIndexed" -> {}},
       GridBoxSpacings->{"Columns" -> {
           Offset[0.27999999999999997`], {
            Offset[0.7]}, 
           Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
           Offset[0.2], {
            Offset[0.4]}, 
           Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}]}]}], 
   TraditionalForm]], "InlineMath"],
 " where ",
 Cell[BoxData[
  FormBox[
   SubscriptBox["t", 
    RowBox[{
     RowBox[{"v", "-", "1"}], ",", "v"}]], TraditionalForm]], "InlineMath"],
 " and ",
 Cell[BoxData[
  FormBox[
   SubscriptBox["r", 
    RowBox[{
     RowBox[{"v", "-", "1"}], ",", "v"}]], TraditionalForm]], "InlineMath"],
 " are Fresnel amplitude coefficients implemented as ",
 ButtonBox["FresnelA ",
  BaseStyle->"Link",
  ButtonData->"paclet:TransferMatrixFormalism/ref/FresnelA"],
 "in this package."
}], "Notes",
 CellChangeTimes->{
  3.5980100380597806`*^9, 3.5980128854330125`*^9, {3.5980153679127703`*^9, 
   3.5980153680531707`*^9}, {3.6235465433882647`*^9, 3.623546544012266*^9}},
 CellID->507687971],

Cell[TextData[{
 Cell[BoxData[
  ButtonBox["RefractionMv",
   BaseStyle->"Link",
   ButtonData->"paclet:TransferMatrixFormalism/ref/RefractionMv"]], 
  "InlineFormula",
  ShowStringCharacters->False],
 " relates fields on the top side of interface ",
 Cell[BoxData[
  StyleBox["v", "TI"]], "InlineFormula",
  ShowStringCharacters->False],
 " to fields adjacent on the bottom side: "
}], "Notes",
 CellChangeTimes->{{3.598014993807117*^9, 3.5980150852710776`*^9}, 
   3.5980235304959126`*^9},
 CellID->848385104],

Cell[TextData[Cell[BoxData[
 FormBox[
  RowBox[{
   RowBox[{"(", "\[NoBreak]", GridBox[{
      {
       SubsuperscriptBox["\[CapitalEpsilon]", "v", "-"]},
      {
       SubsuperscriptBox["\[CapitalEpsilon]", "v", "+"]}
     },
     GridBoxAlignment->{
      "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}},
        "RowsIndexed" -> {}},
     GridBoxSpacings->{"Columns" -> {
         Offset[0.27999999999999997`], {
          Offset[0.7]}, 
         Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
         Offset[0.2], {
          Offset[0.4]}, 
         Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}], "=", 
   RowBox[{
    SubscriptBox["W", 
     RowBox[{
      RowBox[{"v", "-", "1"}], ",", "v"}]], "(", "\[NoBreak]", GridBox[{
      {
       SubsuperscriptBox["\[CapitalEpsilon]", "v", 
        RowBox[{"-", "'"}]]},
      {
       SubsuperscriptBox["\[CapitalEpsilon]", "v", 
        RowBox[{"+", "'"}]]}
     },
     GridBoxAlignment->{
      "Columns" -> {{Center}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}},
        "RowsIndexed" -> {}},
     GridBoxSpacings->{"Columns" -> {
         Offset[0.27999999999999997`], {
          Offset[0.7]}, 
         Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
         Offset[0.2], {
          Offset[0.4]}, 
         Offset[0.2]}, "RowsIndexed" -> {}}], "\[NoBreak]", ")"}]}], 
  TraditionalForm]], "InlineMath"]], "Notes",
 CellChangeTimes->{{3.598014993807117*^9, 3.5980150852710776`*^9}, 
   3.5980235201686945`*^9},
 TextAlignment->Center,
 CellID->158104187]
}, Open  ]],

Cell[CellGroupData[{

Cell["Tutorials", "TutorialsSection",
 CellID->250839057],

Cell[TextData[ButtonBox["Interfacial Nonlinear Spectroscopy of Thin Film \
Systems",
 BaseStyle->"Link",
 ButtonData->
  "paclet:InterfacialThinFilmNLS/tutorial/Interfacial Nonlinear Spectroscopy \
of Thin Film Systems"]], "Tutorials",
 CellChangeTimes->{{3.597778379480859*^9, 3.5977783986376925`*^9}, {
   3.6000111315791473`*^9, 3.6000111315981483`*^9}, {3.6235461474439697`*^9, 
   3.623546156398385*^9}, 3.6235463655323524`*^9, {3.623546417340043*^9, 
   3.6235464174960437`*^9}},
 CellID->40297743]
}, Open  ]],

Cell[CellGroupData[{

Cell["Related Demonstrations", "RelatedDemonstrationsSection",
 CellID->1268215905],

Cell["XXXX", "RelatedDemonstrations",
 CellID->1129518860]
}, Open  ]],

Cell[CellGroupData[{

Cell["Related Links", "RelatedLinksSection",
 CellID->1584193535],

Cell[TextData[ButtonBox["D. B. O\[CloseCurlyQuote]Brien and A. M. Massari, \
\"Modeling multilayer thin film interference effects in interface-specific \
coherent nonlinear optical spectroscopies,\" J. Opt. Soc. Am. B 30, 1503 \
(2013).",
 BaseStyle->"Hyperlink",
 ButtonData->{
   URL["http://dx.doi.org/10.1364/JOSAB.30.001503"], None}]], "RelatedLinks",
 CellChangeTimes->{{3.597765920073867*^9, 3.5977659201674676`*^9}},
 CellID->148884605],

Cell[TextData[ButtonBox["D. B. O\[CloseCurlyQuote]Brien and A. M. Massari, \
\"Simulated vibrational sum frequency generation from a multilayer thin film \
system with two active interfaces,\" J. Chem. Phys. 138, 154708 (2013).",
 BaseStyle->"Hyperlink",
 ButtonData->{
   URL["http://dx.doi.org/10.1063/1.4799921"], None}]], "RelatedLinks",
 CellChangeTimes->{{3.597766065189121*^9, 3.597766067909125*^9}, {
  3.597766108593182*^9, 3.597766108653182*^9}},
 CellID->134447493]
}, Open  ]],

Cell[CellGroupData[{

Cell["See Also", "SeeAlsoSection",
 CellID->1255426704],

Cell[TextData[{
 Cell[BoxData[
  ButtonBox["PhaseMv",
   BaseStyle->"Link",
   ButtonData->"paclet:TransferMatrixFormalism/ref/PhaseMv"]], 
  "InlineFormula"],
 " \[EmptyVerySmallSquare] ",
 Cell[BoxData[
  ButtonBox["FresnelA",
   BaseStyle->"Link",
   ButtonData->"paclet:TransferMatrixFormalism/ref/FresnelA"]], 
  "InlineFormula"],
 " \[EmptyVerySmallSquare] ",
 Cell[BoxData[
  ButtonBox["AbelesS",
   BaseStyle->"Link",
   ButtonData->"paclet:TransferMatrixFormalism/ref/AbelesS"]], "InlineFormula"]
}], "SeeAlso",
 CellChangeTimes->{{3.598009863867874*^9, 3.598009865817878*^9}, {
  3.5980099851902876`*^9, 3.5980099879670925`*^9}, {3.598010196588259*^9, 
  3.5980102009718666`*^9}},
 CellID->929782353]
}, Open  ]],

Cell[CellGroupData[{

Cell["More About", "MoreAboutSection",
 CellID->38303248],

Cell["XXXX", "MoreAbout",
 CellID->1665078683]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[GridBox[{
    {
     StyleBox["Examples", "PrimaryExamplesSection"], 
     ButtonBox[
      RowBox[{
       RowBox[{"More", " ", "Examples"}], " ", "\[RightTriangle]"}],
      BaseStyle->"ExtendedExamplesLink",
      ButtonData:>"ExtendedExamples"]}
   }],
  $Line = 0; Null]], "PrimaryExamplesSection",
 CellID->880084151],

Cell["\<\
The matrix of refraction gives Fresnel Amplitude coefficients for a single \
interface:\
\>", "ExampleText",
 CellChangeTimes->{{3.5980125683886557`*^9, 3.598012604676319*^9}},
 CellID->292179113],

Cell[BoxData[
 RowBox[{"<<", "TransferMatrixFormalism`"}]], "Input",
 CellChangeTimes->{{3.6000069024182777`*^9, 3.600006909860491*^9}},
 CellLabel->"In[1]:=",
 CellID->200727048],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Module", "[", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{"\[Theta]in", "=", 
      RowBox[{"60.", "\[Degree]"}]}], ",", "\[Theta]refract", ",", 
     RowBox[{"n1", "=", "1"}], ",", 
     RowBox[{"n2", "=", "1.5"}]}], "}"}], ",", "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"\[Theta]refract", "=", 
     RowBox[{"RefractionAngle", "[", 
      RowBox[{"\[Theta]in", ",", "n1", ",", "n2"}], "]"}]}], ";", 
    RowBox[{"Column", "@", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"Reduce", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"{", 
           RowBox[{"1", ",", "Er"}], "}"}], "==", 
          RowBox[{
           RowBox[{"RefractionMv", "[", 
            RowBox[{
            "\"\<p\>\"", ",", "\[Theta]in", ",", "\[Theta]refract", ",", "n1",
              ",", "n2"}], "]"}], ".", 
           RowBox[{"{", 
            RowBox[{"Et", ",", "0"}], "}"}]}]}], ",", 
         RowBox[{"{", 
          RowBox[{"Er", ",", "Et"}], "}"}]}], "]"}], ",", 
       "\[IndentingNewLine]", 
       RowBox[{"Row", "@", 
        RowBox[{"{", 
         RowBox[{"\"\<Er = \>\"", ",", 
          RowBox[{"FresnelA", "[", 
           RowBox[{
           "\"\<rp\>\"", ",", "\[Theta]in", ",", "\[Theta]refract", ",", "n1",
             ",", "n2"}], "]"}]}], "}"}]}], ",", "\[IndentingNewLine]", 
       RowBox[{"Row", "@", 
        RowBox[{"{", 
         RowBox[{"\"\<Et = \>\"", ",", 
          RowBox[{"FresnelA", "[", 
           RowBox[{
           "\"\<tp\>\"", ",", "\[Theta]in", ",", "\[Theta]refract", ",", "n1",
             ",", "n2"}], "]"}]}], "}"}]}]}], "}"}]}]}]}], "]"}]], "Input",
 CellChangeTimes->{{3.5980124064054365`*^9, 3.5980125533034286`*^9}, {
  3.5980126215399485`*^9, 3.598012740101157*^9}},
 CellLabel->"In[1]:=",
 CellID->314445705],

Cell[BoxData[
 TagBox[GridBox[{
    {
     RowBox[{
      RowBox[{"Er", "\[Equal]", "0.042449234640745064`"}], "&&", 
      RowBox[{"Et", "\[Equal]", "0.63836717690617`"}]}]},
    {
     TemplateBox[{"\"Er = \"","0.04244923464074506`"},
      "RowDefault"]},
    {
     TemplateBox[{"\"Et = \"","0.63836717690617`"},
      "RowDefault"]}
   },
   DefaultBaseStyle->"Column",
   GridBoxAlignment->{"Columns" -> {{Left}}},
   GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}],
  "Column"]], "Output",
 CellChangeTimes->{
  3.5980124626496696`*^9, 3.598012554301831*^9, {3.598012732472744*^9, 
   3.598012740600358*^9}, 3.6000069187057056`*^9, 3.6235466168019934`*^9},
 CellLabel->"Out[1]=",
 CellID->608126664]
}, Open  ]],

Cell[BoxData[""], "Input",
 CellChangeTimes->{{3.5980126084203258`*^9, 3.598012613178334*^9}},
 CellID->909361352],

Cell["\<\
Build the system transfer matrix for a single thin film layer system:\
\>", "ExampleText",
 CellChangeTimes->{{3.5980107355616064`*^9, 3.598010763813256*^9}},
 CellID->365753876],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Module", "[", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{"n", ",", "\[Theta]", ",", 
     RowBox[{"\[Theta]in", "=", 
      RowBox[{"60.", "\[Degree]"}]}], ",", 
     RowBox[{"d", "=", "200"}], " ", 
     RowBox[{"(*", "nm", "*)"}], ",", 
     RowBox[{"\[Lambda]", "=", "800"}]}], " ", 
    RowBox[{"(*", "nm", "*)"}], "}"}], ",", "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"n", "=", 
     RowBox[{"{", 
      RowBox[{"1", ",", "1.5", ",", "3"}], "}"}]}], ";", 
    "\[IndentingNewLine]", 
    RowBox[{"\[Theta]", "=", 
     RowBox[{"RefractionAngle", "[", 
      RowBox[{"\[Theta]in", ",", "1", ",", "n"}], "]"}]}], ";", 
    "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{
      RowBox[{"RefractionMv", "[", 
       RowBox[{"\"\<p\>\"", ",", 
        RowBox[{"\[Theta]", "[", 
         RowBox[{"[", "1", "]"}], "]"}], ",", 
        RowBox[{"\[Theta]", "[", 
         RowBox[{"[", "2", "]"}], "]"}], ",", 
        RowBox[{"n", "[", 
         RowBox[{"[", "1", "]"}], "]"}], ",", 
        RowBox[{"n", "[", 
         RowBox[{"[", "2", "]"}], "]"}]}], "]"}], ".", 
      RowBox[{"PhaseMv", "[", 
       RowBox[{
        FractionBox["1", "\[Lambda]"], ",", 
        RowBox[{"\[Theta]", "[", 
         RowBox[{"[", "2", "]"}], "]"}], ",", 
        RowBox[{"n", "[", 
         RowBox[{"[", "2", "]"}], "]"}], ",", "d"}], "]"}], ".", 
      RowBox[{"RefractionMv", "[", 
       RowBox[{"\"\<p\>\"", ",", 
        RowBox[{"\[Theta]", "[", 
         RowBox[{"[", "2", "]"}], "]"}], ",", 
        RowBox[{"\[Theta]", "[", 
         RowBox[{"[", "3", "]"}], "]"}], ",", 
        RowBox[{"n", "[", 
         RowBox[{"[", "2", "]"}], "]"}], ",", 
        RowBox[{"n", "[", 
         RowBox[{"[", "3", "]"}], "]"}]}], "]"}]}], "\[Equal]", 
     "\[IndentingNewLine]", 
     RowBox[{"AbelesS", "[", 
      RowBox[{"\"\<p\>\"", ",", 
       FractionBox["1", "\[Lambda]"], ",", "\[Theta]in", ",", 
       RowBox[{"n", "[", 
        RowBox[{"[", "1", "]"}], "]"}], ",", 
       RowBox[{"{", 
        RowBox[{"{", 
         RowBox[{
          RowBox[{"n", "[", 
           RowBox[{"[", "2", "]"}], "]"}], ",", "d"}], "}"}], "}"}], ",", 
       RowBox[{"n", "[", 
        RowBox[{"[", "3", "]"}], "]"}]}], "]"}]}]}]}], "]"}]], "Input",
 CellChangeTimes->{{3.598010727043991*^9, 3.5980107277459927`*^9}, {
   3.598010767151662*^9, 3.5980110793012104`*^9}, 3.5980116656352406`*^9, 
   3.598011758175603*^9, {3.5980118544131727`*^9, 3.5980118598107815`*^9}, {
   3.5980121031020093`*^9, 3.5980121043188114`*^9}, {3.5980123342183075`*^9, 
   3.5980123502252235`*^9}},
 CellLabel->"In[2]:=",
 CellID->553032183],

Cell[BoxData["True"], "Output",
 CellChangeTimes->{{3.5980116427812004`*^9, 3.5980116661812415`*^9}, {
   3.598011754010396*^9, 3.5980117589712048`*^9}, 3.598011860465983*^9, 
   3.598011971280778*^9, {3.598012037940695*^9, 3.5980120451011076`*^9}, 
   3.598012105301613*^9, 3.598012315634245*^9, 3.6235466202808*^9},
 CellLabel->"Out[2]=",
 CellID->504694165]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["More Examples", "ExtendedExamplesSection",
 CellTags->"ExtendedExamples",
 CellID->1854448968],

Cell[BoxData[
 InterpretationBox[Cell["Scope", "ExampleSection"],
  $Line = 0; Null]], "ExampleSection",
 CellID->1293636265],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell["Generalizations & Extensions", "ExampleSection"],
  $Line = 0; Null]], "ExampleSection",
 CellID->1020263627],

Cell["\<\
Completely generalized for complex refractive indices and refraction angles:\
\>", "ExampleText",
 CellChangeTimes->{{3.5980107355616064`*^9, 3.598010763813256*^9}, {
  3.59801281582469*^9, 3.5980128348255234`*^9}},
 CellID->140121424],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Module", "[", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{"n", ",", "\[Theta]", ",", 
     RowBox[{"\[Theta]in", "=", 
      RowBox[{"60.", "\[Degree]"}]}], ",", 
     RowBox[{"d", "=", "200"}], " ", 
     RowBox[{"(*", "nm", "*)"}], ",", 
     RowBox[{"\[Lambda]", "=", "800"}]}], " ", 
    RowBox[{"(*", "nm", "*)"}], "}"}], ",", "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"n", "=", 
     RowBox[{"{", 
      RowBox[{"1", ",", 
       RowBox[{"1.5", "+", "\[ImaginaryI]"}], ",", 
       RowBox[{"3", "+", 
        RowBox[{"20", " ", "\[ImaginaryI]"}]}]}], "}"}]}], ";", 
    "\[IndentingNewLine]", 
    RowBox[{"\[Theta]", "=", 
     RowBox[{"RefractionAngle", "[", 
      RowBox[{"\[Theta]in", ",", "1", ",", "n"}], "]"}]}], ";", 
    "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{
      RowBox[{"RefractionMv", "[", 
       RowBox[{"\"\<p\>\"", ",", 
        RowBox[{"\[Theta]", "[", 
         RowBox[{"[", "1", "]"}], "]"}], ",", 
        RowBox[{"\[Theta]", "[", 
         RowBox[{"[", "2", "]"}], "]"}], ",", 
        RowBox[{"n", "[", 
         RowBox[{"[", "1", "]"}], "]"}], ",", 
        RowBox[{"n", "[", 
         RowBox[{"[", "2", "]"}], "]"}]}], "]"}], ".", 
      RowBox[{"PhaseMv", "[", 
       RowBox[{
        FractionBox["1", "\[Lambda]"], ",", 
        RowBox[{"\[Theta]", "[", 
         RowBox[{"[", "2", "]"}], "]"}], ",", 
        RowBox[{"n", "[", 
         RowBox[{"[", "2", "]"}], "]"}], ",", "d"}], "]"}], ".", 
      RowBox[{"RefractionMv", "[", 
       RowBox[{"\"\<p\>\"", ",", 
        RowBox[{"\[Theta]", "[", 
         RowBox[{"[", "2", "]"}], "]"}], ",", 
        RowBox[{"\[Theta]", "[", 
         RowBox[{"[", "3", "]"}], "]"}], ",", 
        RowBox[{"n", "[", 
         RowBox[{"[", "2", "]"}], "]"}], ",", 
        RowBox[{"n", "[", 
         RowBox[{"[", "3", "]"}], "]"}]}], "]"}]}], "\[Equal]", 
     "\[IndentingNewLine]", 
     RowBox[{"AbelesS", "[", 
      RowBox[{"\"\<p\>\"", ",", 
       FractionBox["1", "\[Lambda]"], ",", "\[Theta]in", ",", 
       RowBox[{"n", "[", 
        RowBox[{"[", "1", "]"}], "]"}], ",", 
       RowBox[{"{", 
        RowBox[{"{", 
         RowBox[{
          RowBox[{"n", "[", 
           RowBox[{"[", "2", "]"}], "]"}], ",", "d"}], "}"}], "}"}], ",", 
       RowBox[{"n", "[", 
        RowBox[{"[", "3", "]"}], "]"}]}], "]"}]}]}]}], "]"}]], "Input",
 CellChangeTimes->{{3.598010727043991*^9, 3.5980107277459927`*^9}, {
   3.598010767151662*^9, 3.5980110793012104`*^9}, 3.5980116656352406`*^9, 
   3.598011758175603*^9, {3.5980118544131727`*^9, 3.5980118598107815`*^9}, {
   3.5980121031020093`*^9, 3.5980121043188114`*^9}, {3.5980123342183075`*^9, 
   3.5980123502252235`*^9}, {3.5980128381951294`*^9, 3.5980128508155518`*^9}},
 CellLabel->"In[3]:=",
 CellID->138036275],

Cell[BoxData["True"], "Output",
 CellChangeTimes->{{3.5980116427812004`*^9, 3.5980116661812415`*^9}, {
   3.598011754010396*^9, 3.5980117589712048`*^9}, 3.598011860465983*^9, 
   3.598011971280778*^9, {3.598012037940695*^9, 3.5980120451011076`*^9}, 
   3.598012105301613*^9, 3.598012315634245*^9, 3.598012852781155*^9, 
   3.623546625023208*^9},
 CellLabel->"Out[3]=",
 CellID->714209561]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell["Options", "ExampleSection"],
  $Line = 0; Null]], "ExampleSection",
 CellID->2061341341],

Cell[BoxData[
 InterpretationBox[Cell["XXXX", "ExampleSubsection"],
  $Line = 0; Null]], "ExampleSubsection",
 CellID->1757724783],

Cell[BoxData[
 InterpretationBox[Cell["XXXX", "ExampleSubsection"],
  $Line = 0; Null]], "ExampleSubsection",
 CellID->1295379749]
}, Closed]],

Cell[BoxData[
 InterpretationBox[Cell["Applications", "ExampleSection"],
  $Line = 0; Null]], "ExampleSection",
 CellID->258228157],

Cell[BoxData[
 InterpretationBox[Cell["Properties & Relations", "ExampleSection"],
  $Line = 0; Null]], "ExampleSection",
 CellID->2123667759],

Cell[BoxData[
 InterpretationBox[Cell["Possible Issues", "ExampleSection"],
  $Line = 0; Null]], "ExampleSection",
 CellID->1305812373],

Cell[BoxData[
 InterpretationBox[Cell["Interactive Examples", "ExampleSection"],
  $Line = 0; Null]], "ExampleSection",
 CellID->1653164318],

Cell[BoxData[
 InterpretationBox[Cell["Neat Examples", "ExampleSection"],
  $Line = 0; Null]], "ExampleSection",
 CellID->589267740]
}, Open  ]]
},
WindowSize->{700, 770},
WindowMargins->{{135, Automatic}, {57, Automatic}},
ShowSelection->True,
CellContext->"Global`",
FrontEndVersion->"9.0 for Microsoft Windows (64-bit) (January 25, 2013)",
StyleDefinitions->FrontEnd`FileName[{"Wolfram"}, "FunctionPageStyles.nb", 
  CharacterEncoding -> "WindowsANSI"]
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{
 "ExtendedExamples"->{
  Cell[19469, 649, 100, 2, 53, "ExtendedExamplesSection",
   CellTags->"ExtendedExamples",
   CellID->1854448968]}
 }
*)
(*CellTagsIndex
CellTagsIndex->{
 {"ExtendedExamples", 24907, 815}
 }
*)
(*NotebookFileOutline
Notebook[{
Cell[557, 20, 324, 14, 22, "History",
 CellID->1247902091],
Cell[CellGroupData[{
Cell[906, 38, 68, 1, 27, "CategorizationSection",
 CellID->1122911449],
Cell[977, 41, 79, 2, 31, "Categorization",
 CellID->686433507],
Cell[1059, 45, 148, 3, 31, "Categorization",
 CellID->144455187],
Cell[1210, 50, 93, 2, 31, "Categorization",
 CellID->130392281],
Cell[1306, 54, 149, 3, 31, "Categorization",
 CellID->603290130]
}, Open  ]],
Cell[CellGroupData[{
Cell[1492, 62, 55, 1, 27, "KeywordsSection",
 CellID->477174294],
Cell[1550, 65, 128, 2, 17, "Keywords",
 CellID->1164421360],
Cell[1681, 69, 127, 2, 17, "Keywords",
 CellID->978050760],
Cell[1811, 73, 115, 2, 17, "Keywords",
 CellID->174380810]
}, Open  ]],
Cell[CellGroupData[{
Cell[1963, 80, 65, 1, 27, "TemplatesSection",
 CellID->1872225408],
Cell[2031, 83, 94, 2, 70, "Template",
 CellID->1562036412],
Cell[2128, 87, 82, 2, 70, "Template",
 CellID->158391909],
Cell[2213, 91, 81, 2, 70, "Template",
 CellID->1360575930],
Cell[2297, 95, 82, 2, 70, "Template",
 CellID->793782254]
}, Closed]],
Cell[CellGroupData[{
Cell[2416, 102, 53, 1, 17, "DetailsSection",
 CellID->307771771],
Cell[2472, 105, 63, 2, 70, "Details",
 CellID->670882175],
Cell[2538, 109, 69, 2, 70, "Details",
 CellID->350963985],
Cell[2610, 113, 64, 2, 70, "Details",
 CellID->8391405],
Cell[2677, 117, 69, 2, 70, "Details",
 CellID->3610269],
Cell[2749, 121, 61, 2, 70, "Details",
 CellID->401364205],
Cell[2813, 125, 61, 2, 70, "Details",
 CellID->350204745],
Cell[2877, 129, 63, 2, 70, "Details",
 CellID->732958810],
Cell[2943, 133, 78, 2, 70, "Details",
 CellID->222905350],
Cell[3024, 137, 67, 2, 70, "Details",
 CellID->240026365]
}, Closed]],
Cell[CellGroupData[{
Cell[3128, 144, 55, 1, 62, "ObjectName",
 CellID->1224892054],
Cell[3186, 147, 1482, 47, 89, "Usage"],
Cell[4671, 196, 163, 4, 23, "Notes",
 CellID->1067943069],
Cell[4837, 202, 1194, 32, 39, "Notes",
 CellID->129421124],
Cell[6034, 236, 1851, 58, 58, "Notes",
 CellID->507687971],
Cell[7888, 296, 511, 15, 25, "Notes",
 CellID->848385104],
Cell[8402, 313, 1591, 44, 50, "Notes",
 CellID->158104187]
}, Open  ]],
Cell[CellGroupData[{
Cell[10030, 362, 57, 1, 43, "TutorialsSection",
 CellID->250839057],
Cell[10090, 365, 504, 10, 16, "Tutorials",
 CellID->40297743]
}, Open  ]],
Cell[CellGroupData[{
Cell[10631, 380, 83, 1, 30, "RelatedDemonstrationsSection",
 CellID->1268215905],
Cell[10717, 383, 58, 1, 16, "RelatedDemonstrations",
 CellID->1129518860]
}, Open  ]],
Cell[CellGroupData[{
Cell[10812, 389, 65, 1, 30, "RelatedLinksSection",
 CellID->1584193535],
Cell[10880, 392, 444, 8, 29, "RelatedLinks",
 CellID->148884605],
Cell[11327, 402, 476, 8, 29, "RelatedLinks",
 CellID->134447493]
}, Open  ]],
Cell[CellGroupData[{
Cell[11840, 415, 55, 1, 30, "SeeAlsoSection",
 CellID->1255426704],
Cell[11898, 418, 710, 21, 19, "SeeAlso",
 CellID->929782353]
}, Open  ]],
Cell[CellGroupData[{
Cell[12645, 444, 57, 1, 30, "MoreAboutSection",
 CellID->38303248],
Cell[12705, 447, 46, 1, 16, "MoreAbout",
 CellID->1665078683]
}, Open  ]],
Cell[CellGroupData[{
Cell[12788, 453, 356, 11, 68, "PrimaryExamplesSection",
 CellID->880084151],
Cell[13147, 466, 206, 5, 20, "ExampleText",
 CellID->292179113],
Cell[13356, 473, 179, 4, 27, "Input",
 CellID->200727048],
Cell[CellGroupData[{
Cell[13560, 481, 1801, 48, 128, "Input",
 CellID->314445705],
Cell[15364, 531, 730, 21, 52, "Output",
 CellID->608126664]
}, Open  ]],
Cell[16109, 555, 114, 2, 27, "Input",
 CellID->909361352],
Cell[16226, 559, 188, 4, 20, "ExampleText",
 CellID->365753876],
Cell[CellGroupData[{
Cell[16439, 567, 2618, 68, 186, "Input",
 CellID->553032183],
Cell[19060, 637, 360, 6, 25, "Output",
 CellID->504694165]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[19469, 649, 100, 2, 53, "ExtendedExamplesSection",
 CellTags->"ExtendedExamples",
 CellID->1854448968],
Cell[19572, 653, 125, 3, 30, "ExampleSection",
 CellID->1293636265],
Cell[CellGroupData[{
Cell[19722, 660, 148, 3, 18, "ExampleSection",
 CellID->1020263627],
Cell[19873, 665, 245, 5, 20, "ExampleText",
 CellID->140121424],
Cell[CellGroupData[{
Cell[20143, 674, 2778, 71, 186, "Input",
 CellID->138036275],
Cell[22924, 747, 388, 7, 25, "Output",
 CellID->714209561]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[23361, 760, 127, 3, 30, "ExampleSection",
 CellID->2061341341],
Cell[23491, 765, 130, 3, 70, "ExampleSubsection",
 CellID->1757724783],
Cell[23624, 770, 130, 3, 70, "ExampleSubsection",
 CellID->1295379749]
}, Closed]],
Cell[23769, 776, 131, 3, 18, "ExampleSection",
 CellID->258228157],
Cell[23903, 781, 142, 3, 18, "ExampleSection",
 CellID->2123667759],
Cell[24048, 786, 135, 3, 18, "ExampleSection",
 CellID->1305812373],
Cell[24186, 791, 140, 3, 18, "ExampleSection",
 CellID->1653164318],
Cell[24329, 796, 132, 3, 18, "ExampleSection",
 CellID->589267740]
}, Open  ]]
}
]
*)

(* End of internal cache information *)
